#!/bin/bash dd if=image.bmp of=target-image.bit.bmp bs=54 count=1 conv=notrunc # Restore BMP header # ============================================================================== # About FinalCrypt's Disabled MAC Mode... I copied a BMP image and encrypted the copy (with FinalCrypt's Non MAC Mode) and after encrypting it, restoring it's original 56 bytes metadata header (from the original image into the encrypted image) and called it mypicture.bmp.bit.bmp. Then it will simply be shown by your default BMP imageviewer. With GIMP you can do a histogram and some other analysis on it. FinalCrypt's Non MAC Mode (RAW / Legacy Mode) button is positioned at the lower right part of the interface and has to be enabled first with a double click, before it can then be toggled on to: "Disabled MAC Mode". This is just to protect regular users from accidentally enabling disabled MAC Mode. One more click takes it out of disabled MAC Mode and locks / disables the button again. # Restoring the BMP metadata header to an encrypted bmp file is simply done as follows (on Linux): dd if=mypicture_copy.bmp of=mypicture.bmp.bit bs=54 count=1 conv=notrunc # FinalCrypt has a command line interface too, which is even more flexible than the GUI and you can automate the whole process (on Linux): # Code: cp mypicture.bmp mypicture_copy.bmp # Just making sure you have a copy of the original before it is encrypted java -cp FinalCrypt.jar rdj.CLUI --create-keyfile -K mykeyfile.dat -S "$(stat -c "%s" "${image1}")" # Create 100 MiB OTP key file. Also interesting is using another image as your encryption key in FinalCrypt java -cp FinalCrypt.jar rdj.CLUI --disable-MAC --encrypt -k mykeyfile.dat -t mypicture.bmp # Encrypt the image. Normally you would NOT use --disable-MAC dd if=mypicture_copy.bmp of=mypicture.bmp.bit bs=54 count=1 conv=notrunc # Restoring the original BMP metadata header mv mypicture.bmp.bit mypicture.bmp.bit.bmp gimp mypicture.bmp.bit.bmp # Opening image with the GIMP # Decrypting wouldn't be necessary for the purpose of this experiment, but would go as follows: # Code: mv mypicture.bmp.bit.bmp mypicture.bmp.bit # Non MAC Mode just swaps extensions with every encryption round, unlike MAC Mode which controllable adds the .bit in --encrypt mode en removes the .bit in --decrypt mode java -cp FinalCrypt.jar rdj.CLUI --disable-MAC --encrypt -k mykeyfile.dat -t mypicture.bmp.bit # Encrypt (actually) decrypt the image, but in NON MAC Mode there is no way FinalCrypt can know the target is already encrypted. Normally you would use --decrypt in the default MAC Mode dd if=mypicture_copy.bmp of=mypicture.bmp bs=54 count=1 conv=notrunc # Restoring the original BMP metadata header and the original picture is restored again.